import axios from 'axios'

import {base} from './zxy_api'

//shopAd SEARCH
export const getAdLists = (params) => {
  return axios.get(`${base}/admin/shop/ads/query`, {params})
}
//shopAd upload new form
export const uploadFormInfo = (params, config) => {
  return axios.post(`${base}/admin/shop/ads/sell`, params, config)
}
//shopAd edit form
export const editFormInfo = (params, config) => {
  return axios.post(`${base}/admin/shop/ads/edit`, params, config)
}
//get phnoe brand model data
export const getBrandModelData = (params) => {
  return axios.get(`${base}/admin/shop/phone_model/select-model-by-brand-property-id`, {params})
}
//shopAd upload photos
export const uploadShopAdPhotos = (params, config) => {
  return axios.post(`${base}/admin/shop/ads/imageUpload `, params, config)
}
//shopAd get view data
export const getShopViewData = (params) => {
  return axios.get(`${base}/admin/shop/ads/detail`, {params})
}
//shopAdView table
export const getAdViewTable = (params, config) => {
  return axios.get(`${base}/admin/shop/ads/queryAdLog`, {params}, config)
}
//shopuser search
export const shopUserSearch = (params, config) => {
  return axios.get(`${base}/admin/shop/user/query`, {params}, config)
}
//shopuser add
export const shopUserAdd = (params, config) => {
  return axios.post(`${base}/admin/shop/user/add`, params, config)
}
//shopuser photo upload
export const uploadUserPhotos = (params, config) => {
  return axios.post(`${base}/admin/shop/user/upload`, params, config)
}
//shopuser edit
export const shopUserEdit = (params, config) => {
  return axios.post(`${base}/admin/shop/user/edit`, params, config)
}
//shopuser check
export const shopUserCheck = (params) => {
  return axios.get(`${base}/admin/shop/user/check?account=${params.account}&name=${params.name}`,)
}
//shopuser detail
export const shopUserDetail = (params) => {
  return axios.get(`${base}/admin/shop/user/detail`, {params})
}
//shopUserView activity list
export const getActivityList = (params) => {
  return axios.get(`${base}/admin/shop/user/query-activity`, {params})
}
//shopUserView log list  这个接口待添加
//user activity detail
export const userActivityDetail = (params) => {
  return axios.get(`${base}/admin/shop/user/detail-activity`, {params})
}
// user activity add
export const userActivityAdd = (params, config) => {
  return axios.post(`${base}/admin/shop/user/add-activity`, params, config)
}
//下面是审核的接口
//verification index 获取tolymoly审核数据
export const getVerifyStatusInfo = (params) => {
  return axios.get(`${base}/admin/shop/verification/select-count-with-verificationStatus`, {params})
}
//verification index 获取property审核数据
export const getPropertyVerifyInfo = (params) => {
  return axios.get(`${base}/admin/transaction-verifaction/select-count-with-verificationStatus`, {params})
}
//下面是tolymoly审核详情页的接口
//get verify data
export const getVerifyData = (params) => {
  return axios.get(`${base}/admin/shop/verification/select-verification-detail`, {params})
}
//tolymoly verifyApprove
export const verifyApprove = (params, config) => {
  return axios.post(`${base}/admin/shop/verification/verification-approve`, params, config)
}
//tolumoly verifyNotSure
export const verifyNotSure = (params, config) => {
  return axios.post(`${base}/admin/shop/verification/verification-not-sure`, params, config)
}
//tolymoly verifyReject
export const verifyReject = (params, config) => {
  return axios.post(`${base}/admin/shop/verification/verification-reject`, params, config)
}
//通过商品id获得审核数据
//admin/shop/verification/select-goods-verification-detail  参数 goodsId, verificationStatus
export const getVerifyDataById = (params,config) => {
  return axios.post(`${base}/admin/shop/verification/select-goods-verification-detail`, params,config)
}
//下面是property审核详情页的接口
//get property verify data
export const getPropertyVerifyData = (params) => {
  return axios.get(`${base}/admin/transaction-verifaction/select-verification-detail`, {params})
}
//property verify approve
export const propertyVerifyApprove = (params, config) => {
  return axios.get(`${base}/admin/transaction-verifaction/verification-approve`, {params})
}
//property verify notsure
export const propertyVerifyNotSure = (params, config) => {
  return axios.get(`${base}/admin/transaction-verifaction/verification-not-sure`, {params})
}
//property verify reject
export const propertyVerifyReject = (params, config) => {
  return axios.get(`${base}/admin/transaction-verifaction/verification-reject`, {params})
}
//通过property id获得审核数据
export const getPropertyVerifyDataById = (params,config) => {
  return axios.post(`${base}/admin/transaction-verifaction/select-transaction-verification-detail`, params,config)
}
//property 日志
export const getPropertyLog = (params, config) => {
  return axios.get(`${base}/admin/transaction-verifaction/queryTransactionLog`, {params})
}










//reported ad
export const getReportedAd = (params) => {
  return axios.get(`${base}/admin/shop/reportAds/query`, {params})
}
//duplicate query
export const getDuplicateData = (params) => {
  return axios.get(`${base}/admin/shop/duplicate/query`, {params})
}
//duplicate view
export const getDuplicateViewData = (params) => {
  return axios.get(`${base}/admin/shop/duplicate/view`, {params})
}
//phone search
export const phoneSearch = (params) => {
  return axios.get(`${base}/admin/shop/phone_model/list`, {params})
}
//new phone add
export const newAddPhoneInfo= (params,config) => {
  return axios.post(`${base}/admin/shop/phone_model/add`, params,config)
}
//edit phone info
export const editPhoneInfo= (params,config) => {
  return axios.post(`${base}/admin/shop/phone_model/edit`, params,config)
}
//get phone brand
export const getPhoneBrand = (params) => {
  return axios.get(`${base}/admin/shop/phone_model/select_brand`, {params})
}
//phone info view
export const getPhoneInfo = (params) => {
  return axios.get(`${base}/admin/shop/phone_model/detail`, {params})
}
//electronics upload
export const getElectronicsUserName = (params) => {
  return axios.get(`${base}/admin/shop/ads/fixed_user`, {params})
}
//electronics excel query
export const searchElectronicsExcel = (params) => {
  return axios.get(`${base}/admin/shop/electronics/query`, {params})
}
//electronics detail
export const getExcelDetail = (params) => {
  return axios.get(`${base}/admin/shop/electronics/detail`, {params})
}
//excel save
export const saveExcel= (params,config) => {
  return axios.post(`${base}/admin/shop/electronics/save`, params,config)
}
//category transition index
export const getCategoryTransition = (params) => {
  return axios.get(`${base}/admin/shop/category/query`, {params})
}
//category transition new
export const categoryTransitionNew= (params,config) => {
  return axios.post(`${base}/admin/shop/category/save`, params,config)
}
//category transition edit
export const categoryTransitionEdit= (params,config) => {
  return axios.post(`${base}/admin/shop/category/edit`, params,config)
}
//获取属性
export const getPropertyList = (params) => {
  return axios.get(`${base}/admin/shop/property/query`, {params})
}
//获取属性详情
export const getPropertyDetail = (params) => {
  return axios.get(`${base}/admin/shop/property/detail`, {params})
}
//获取属性值数据
export const getSubProperty = (params) => {
  return axios.get(`${base}/admin/shop/property_value/query`, {params})
}
//编辑属性
export const updateProperty= (params) => {
  return axios.post(`${base}/admin/shop/property/update`,params)
}
//新增属性
export const addNewProperty= (params) => {
  return axios.post(`${base}/admin/shop/property/save`,params)
}
//编辑属性值数据呀
export const propertyValueEdit= (params,config) => {
  return axios.post(`${base}/admin/shop/property_value/edit`, params,config)
}
//新增属性值数据
export const propertyValueAdd= (params,config) => {
  return axios.post(`${base}/admin/shop/property_value/save`, params,config)
}
//动态获取category
export const getCategory = (params) => {
  return axios.get(`${base}/admin/shop/category/all`, {params})
}
